// 用户模块
import http from '../request'
// 用户注册
export function userRegister(data){
  return http({
    method:'POST',
    url:'/api/shop/register',
    data
  })
}
// 用户登录
export function userLoginApi(data){
  return http({
    method:'POST',
    url:'/api/shop/login',
    data
  })
}
// 充值余额(需要token) 
export function rechargeApi(data){
  return http({
    method:'POST',
    url:'/api/shop/user/recharge',
    data
  })
}
// 查看余额(需要token)
export function balanceApi(params){
  return http({
    method:'GET',
    url:'/api/shop/user/balance',
    params
  })
}
// 更新用户信息
export function updateUserInfoApi(id,data){
  return http({
    method:'PUT',
    url:`/api/shop/user/${id}`,
    data
  })
}